package org.xb.FactoryMethod;

/**
 * @Author
 * @Description
 * @Date created in 15:08 2023/11/29
 */
public class DivOperate implements IOperate{
    @Override
    public Double operate(Double number1, Double number2) {
        if (number2.equals(0D)){
            throw new RuntimeException("除数不能为0");
        }
        return number1 / number2;
    }
}
